package com.haixiaoke.saas.menu.domain;

import com.haixiaoke.saas.common.annotation.Excel;
import com.haixiaoke.saas.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.ArrayList;
import java.util.List;

/**
 * 企业端菜单权限对象 biz_menu
 * 
 * @author panda
 * @date 2023-12-29
 */
@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
public class BizMenu extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 菜单ID */
    private Long menuId;

    /** 菜单名称 */
    @Excel(name = "菜单名称")
    private String menuName;

    /** 父菜单ID */
    @Excel(name = "父菜单ID")
    private Long parentId;

    /** 显示顺序 */
    @Excel(name = "显示顺序")
    private Integer orderNum;

    /** 路由地址 */
    @Excel(name = "路由地址")
    private String path;

    /** 组件路径 */
    @Excel(name = "组件路径")
    private String component;

    /** 路由参数 */
    @Excel(name = "路由参数")
    private String query;

    /** 是否为外链（0是 */
    @Excel(name = "是否为外链", readConverterExp = "是否为外链（0是")
    private Integer isFrame;

    /** 是否缓存（0缓存 */
    @Excel(name = "是否缓存", readConverterExp = "是否缓存（0缓存")
    private Integer isCache;

    /** 菜单类型（M目录 */
    @Excel(name = "菜单类型", readConverterExp = "菜单类型（M目录")
    private String menuType;

    /** 菜单状态（0显示 */
    @Excel(name = "菜单状态", readConverterExp = "菜单状态（0显示")
    private String visible;

    /** 菜单状态（0正常 */
    @Excel(name = "菜单状态", readConverterExp = "菜单状态（0正常")
    private String status;

    /** 权限标识 */
    @Excel(name = "权限标识")
    private String perms;

    /** 菜单图标 */
    @Excel(name = "菜单图标")
    private String icon;

    /**
     * 自定义字段，用户id
     */
    private Long userId;

    /**
     * 子菜单
     */
    private List<BizMenu> children = new ArrayList<BizMenu>();
}
